import Vue from 'vue'
import VueRouter from "vue-router";

import layout from '@/views/layout'
import detail from '@/views/article-detail'
import index from '@/views/index'
import find from '@/views/find'
import search from '@/views/search'
import my from '@/views/my'
Vue.use(VueRouter)

const router = new VueRouter({
  routes: [
    {
      path:'/',
      component:layout,
      redirect:'/find',
      children:[
        {
          path:'index',
          component:index,
        },
        {
          path:'find',
          component:find,
        },
        {
          path:'search',
          component:search,
        },
        {
          path:'my',
          component:my,
        }

      ]
    },
    {
      name:'detail',
      path:'/detail',
      component:detail
    }
  ]
})

export default router